home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-06-05 | 2.0 KB | 84 lines | [TEXT/MPS ] |
- /*
- File: SampleFileTranslationExt.r
-
- Contains: Sample resources for writing a File Translation Extension.
-
- Copyright: © 1991-1993 by Apple Computer, Inc., all rights reserved.
- */
-
-
-
- #include "Types.r"
- #include "TranslationExtensions.h"
- #include "FileTypesAndCreators.h"
-
- Include $$Shell("C3POObjects")"IM Example.rsrc"; // get 'xlat' code
-
-
- #define kSignature 'ashe' /* set this to creator signature of extension */
- #define kComponentFileType 'thng' /* 'thng' => ComponentMgr component file */
-
-
- // Define the 'thng' resource to bind other resources together
- resource 'thng' (128, locked) {
- 'xlat', /* all Translation Extensions have type = 'xlat' */
- 0, /* sub type unused */
- kSignature, /* must be unique across all translation extensions */
- kSupportsFileTranslation, /* add in kSupportsScapTranslation if scrap routines are implemented */
- 0, /* mask is ignored and should be 0 */
- 'xlat',128,
- 'STR ',128,
- 'STR ',129,
- 'ICON',128
- };
-
-
- // Strings
- resource 'STR ' (128, purgeable) {
- "Generic"
- };
-
- resource 'STR ' (129, purgeable) {
- "This is a sample Generic translation extension"
- };
-
- // An icon
- resource 'ICON' (128, purgeable) {
- $"7FFF FFF0 8000 0008 8000 0008 8000 0008"
- $"8000 0008 8000 0008 8000 0008 8000 0008"
- $"A000 0008 D000 000A 9000 000D 1000 0009"
- $"1000 0001 1000 0001 1000 0001 1000 0001"
- $"1000 0001 1000 0001 1000 0001 1000 0001"
- $"1000 0009 9000 000D D000 000A A000 0008"
- $"8000 0008 8000 0008 8000 0008 8000 0008"
- $"8000 0008 8000 0008 8000 0008 7FFF FFF0",
- };
-
- // Kind strings for documents supported
- resource 'kind' (128, purgeable) {
- 'dsny',
- 0, // verUS
- {
- ftApplicationName, "SleepyWrite",
- 'slpy', "SleepyWrite document",
- }
- };
-
- resource 'kind' (129, purgeable) {
- 'mcky',
- 0, // verUS
- {
- ftApplicationName, "HappyWrite",
- 'hapy', "HappyWrite document",
- }
- };
-
- resource 'kind' (130, purgeable) {
- 'ttxt',
- 0, // verUS
- {
- ftApplicationName, "TeachText",
- 'ttro', "TeachText document",
- }
- };
-